{include file="common/header.tpl"}
{if isset($AppUI->id) && $AppUI->id > 0}	
{else}
	<section class="login">
    	<h1><img src="{$smarty.const.HOST_STATICS}admin/img/header.gif" width="468" height="80" alt="Administrator Control Panel"></h1> 
        
    	<form name="frmLogin" id="frmLogin" method="post" action="{$smarty.const.HOST_BACKEND}index/login" enctype="multipart/form-data">
        	<input type="hidden" name="password" id="password" />
        	<header><h2>Đăng nhập hệ thống quản trị {$smarty.const.DOMAIN}</h2></header>
        	<ul>
            	{if isset($smarty.session.LOGIN_ERROR.error)}
                	<li class="error">
                        <span class="error">Thông tin đăng nhập không đúng</span>
                    </li>
                {/if}
            	<li>
                	<label for="username">Username:</label>
                    <div class="txt">
                    	<input type="text" name="username" id="username" value="{if isset($smarty.session.LOGIN_ERROR.username)}{$smarty.session.LOGIN_ERROR.username|escape}{/if}" maxlength="25" />
                   	</div>
                </li>
                <li>
                	<label for="password_h">Mật khẩu:</label>
                    <div class="txt">
                    	<input type="password" name="password_h" id="password_h" value="" maxlength="100" />
                   	</div>
                </li>
                <li>
                	<button type="submit"><span>Đăng nhập</span></button>
                    <a href="{$smarty.const.HOST_FRONTEND}">Quay trở về trang chủ</a>
                </li>
            </ul>
        </form>
    </section>
{/if}
{include file="common/footer.tpl"}